/*
Crossing the Line: Evidence for the categorization theory of spatial voting

REPLICATION FILE FOR US ANALYSIS

APRIL 19, 2023
*/

cd ["enter path to files here"]
clear
use "RP US data.dta"

**PART 1
*Norm effect (Figure 2)
mean Q3b if Q1~=997 & Q3b~=997 & (Q1>52 | Q1<48) & treatment == 1 & page2_timing >10 & page1_timing >5
mean Q3b if Q1~=997 & Q3b~=997 & (Q1>52 | Q1<48) & treatment == 0 & page2_timing >10 & page1_timing >5
ttest Q3b if Q1~=997 & Q3b~=997  & (Q1>52 | Q1<48) & page2_timing >10 & page1_timing >5, by(treatment) 

*Vote effect (Figure 3)
mean Q2b if Q1~=997 & Q2b~=997 & (Q1>52 | Q1<48) & treatment == 1 & page2_timing >10 & page1_timing >5
mean Q2b if Q1~=997 & Q2b~=997 & (Q1>52 | Q1<48) & treatment == 0 & page2_timing >10 & page1_timing >5
ttest Q2b if Q1~=997 & Q2b~=997  & (Q1>52 | Q1<48) & page2_timing >10 & page1_timing >5, by(treatment) 


